//------------------------------------------------------------------------------
//
//  File: AppleList.h
//
//  Copyright (C) 2007 Visual.Wei
//  Author: Wei Shuai <cpuwolf@sina.com>
//
//  Common Class for Device Driver Development
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
//
#pragma once

#include <windows.h>
#include <commctrl.h>
#include <list>

using namespace std ;

class CAppleList
{
	
public:
	CAppleList(HDC hdc,RECT * prect);
	~CAppleList(void);
	void Paint(HDC hdc);
	BOOL Add(const TCHAR *l,const TCHAR *r);
protected:
	HFONT hleftfont;
	HFONT hrightfont;
	HPEN hpen;
	HBRUSH hbrbg;
	RECT rect;
	RECT fontrect;
private:
	const int LINE_HIGHT;
	const int FONT_OFFSET;
	struct vlist
	{
		const TCHAR * left;
		int leftlen;
		const TCHAR * right;
		int rightlen;

	};

	list <struct vlist> mylist;
	list <struct vlist>::iterator m_Iter;

	
	
};


